/**
 * Construct HTML string that will be inserted into the content container.
 * 
 * This goes through the RSS entries and creates a vertical list of RSS
 * entries. Each entry is represented by a picture and title. Clicking on the
 * title unrolls the summary attached to the RSS entry.
 */

function getVerticalViewHTML(){

	var maxEntries = 10;
	var outputstr = "";
	var entryIndex = 0;
	
	outputstr += '<div class="xmlPubDate">';
	if(entries['xmlPubDate'])
		outputstr += entries['xmlPubDate'];
	else
		outputstr += '&nbsp';
	outputstr += '</div>';
	
	for (var i = 0; i < entries.length && entryIndex < maxEntries; i++)
	{
		var entryToShow = "entry"+entryIndex;
		outputstr += '<div id="entry' + i + '" class="entry " onclick="';
		outputstr += 'mwl.setGroupTarget(\'#btns\',\'#btn' + (entryIndex) + '\', \'show\', \'hide\');';
		outputstr += 'mwl.switchClass(\'#views\', \'view1\', \'view2\');';
		outputstr += 'mwl.addClass(\'#entries\', \''+entryToShow+'\');';
		outputstr += 'mwl.scrollTo(\'#views\');'
		outputstr += 'mwl.addClass(\'#entries\', \'hortransition\');';
		outputstr += '">';
		outputstr += '<table>';
		outputstr += '<tr>';
			
		outputstr += "<td valign='top'>";
		outputstr += '<div class="headlinePic">';
		outputstr += entries[i].image;
		outputstr += '</div>';
		outputstr += "</td>";
			
		outputstr += "<td valign='top'>";
		outputstr += '<div class="headline">';
		outputstr += entries[i].title;
		if (entries[i].pubDate)
		{
			outputstr += '<div class="pubDate">';
			outputstr += entries[i].pubDate;
			outputstr += '</div>';
		}
		outputstr += '</div>';
		outputstr += '</td>';
			
		outputstr += '</tr>';
		outputstr += '</table>';

		outputstr += '</div>'; // end entry
			
		entryIndex++;
	}
	
	return outputstr;
}